﻿namespace QuickMail.View.Windows
{
    using System.Diagnostics;
    using System.Reflection;
    using System.Windows.Navigation;

    using QuickMail.DataModels;

    /// <summary>
    /// The about program window.
    /// </summary>
    public partial class AboutWindow
    {
        public AboutWindow()
        {
            InitializeComponent();

            // ReSharper disable once RedundantThisQualifier
            this.Title = StaticFields.Lang.AboutWindow.Title;
            DescriptionTextBlock.Text = StaticFields.Lang.AboutWindow.Description;
            DetailedInformationTextBlock.Text = StaticFields.Lang.AboutWindow.DetailedInformation;
            OtherResourcesTextBlock.Text = StaticFields.Lang.AboutWindow.OtherResources;
            GratitudeTextBlock.Text = StaticFields.Lang.AboutWindow.Gratitude;
            SoftwareVersionTextBlock.Text = StaticFields.Lang.AboutWindow.Version;
            AuthorTextBlock.Text = StaticFields.Lang.AboutWindow.Author;

            CurrentVersionTextBlock.Text = Assembly.GetExecutingAssembly().GetName().Version
                + " beta";
        }

        private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
        {
            Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
            e.Handled = true;
        }
    }
}
